package 添加逗号;

import java.util.Scanner;

// 注意类名必须为 Main, 不要有任何 package xxx 信息
public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String s = in.next();
        int n = Integer.parseInt(s);
        char[] arr = String.valueOf(n).toCharArray();
        int len = arr.length, cnt = 0;
        StringBuilder res = new StringBuilder("");
        for (int i = len; i >= 1; i--) {
            res.append(arr[i - 1]);
            cnt++;
            if (i != 1 && cnt % 3 == 0) {
                res.append(",");
            }
        }
        System.out.println(res.reverse());
    }
}